package com.mycompany.client;

import com.mycompany.shared.FieldVerifier;
import com.google.gwt.user.client.Window;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.DeckPanel;
import com.google.gwt.event.dom.client.DoubleClickHandler;
import com.google.gwt.event.dom.client.DoubleClickEvent;
import com.google.gwt.user.client.ui.NamedFrame;
import com.google.gwt.user.client.ui.HorizontalPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Tentando implements EntryPoint {
	/**
	 * The message displayed to the user when the server cannot be reached or
	 * returns an error.
	 */
	private static final String SERVER_ERROR = "An error occurred while "
			+ "attempting to contact the server. Please check your network "
			+ "connection and try again.";

	/**
	 * Create a remote service proxy to talk to the server-side Greeting service.
	 */
	private final GreetingServiceAsync greetingService = GWT
			.create(GreetingService.class);
	
	private RootPanel rootPanel;
	
	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		
		
		rootPanel = RootPanel.get();
		
		Button botaoLogar= new Button("New button");
		botaoLogar.setText("LOGAR");
		rootPanel.add(botaoLogar, 283, 170);
		
		Button botaoCadastrar= new Button("New button");
		botaoCadastrar.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				cadastrar();
			//	btnNewButton
			}
		});
		botaoCadastrar.setText("CADASTRAR");
		rootPanel.add(botaoCadastrar, 267, 289);
		
		Label lblNewLabel = new Label("BEM VINDO");
		rootPanel.add(lblNewLabel, 283, 57);
		lblNewLabel.setSize("80px", "18px");
		
		
	}
	
	private void cadastrar(){
		AbsolutePanel abs = new AbsolutePanel();
		Label label = new Label("RESPONDA O FORMULARIO ABAIXO");
		
		abs.add(label);
		rootPanel.add(abs);
		
	}
}
